<template>
    <div>
        <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
            :editFormFileds="editFormFields" :editFormOptions="editFormOptions" :searchFormFields="searchFormFields"
            :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table"
            :extend="extend" :ck="false">
        </view-grid>
    </div>
</template>

<script>
import extend from "@/extension/mall/ticketDetails.js";
import ViewGrid from "@/components/basic/ViewGrid.vue";
var vueParam = {
    components: {
        ViewGrid
    },
    data() {
        return {
            table: {
                key: 'Id',
                footer: "Foots",
                cnName: '票务产品明细统计报表',
                name: 'ticketDetails',
                sortName: "Id",
                url: '/Small_statistic_sale_order/'
            },
            extend: extend,
            editFormFields: {},
            editFormOptions: [],
            searchFormFields: { product_name: "", ticket_name: "", channel_type: "", startTime: "", endTime: "" },
            searchFormOptions: [[
                { "title": "产品名称", "field": "product_name", "type": "like" }, 
                // { "title": "票种名称", "field": "ticket_name", "type": "like" },
                { "title": "销售渠道", "field": "channel_type", "type": "select", "dataKey": '',data: [] },
                { "title": "创建时间", "field": "date_time", "type": "date" }],
            ],
            columns: [
                {field:'id',title:'主键',type:'string',width:220,hidden:true,readonly:true,require:true,align:'left'},
                { field: 'product_name', title: '产品名称', type: 'string', width: 190, align: 'left' },
                { field: 'product_id', title: '产品ID', type: 'string', align: 'left' },
                { field: 'product_ticket_type_name', title: '产品分类', type: 'string', width: 120, align: 'left' },
                // { field: 'ticket_name', title: '票种名称', type: 'string', width: 120, align: 'left' },
                { field: 'channel_type_name', title: '销售渠道', type: 'string', width: 120, align: 'left' },
                { field: 'sales_price', title: '销售单价（元）', type: 'string', width: 120, align: 'left' },
                { field: 'sales_number', title: '销售数量', type: 'string', width: 120, align: 'left' },
                { field: 'sales_amount', title: '销售金额', type: 'string', width: 120, align: 'left' },
                { field: 'veriy_number', title: '核销数量', type: 'string', width: 120, align: 'left' },
                { field: 'veriy_amount', title: '核销金额', type: 'string', width: 120, align: 'left' },
                { field: 'refund_number', title: '退款数量', type: 'datetime', width: 120, align: 'left', sortable: true },
                { field: 'refund_amount', title: '退款金额', type: 'decimal', width: 120, align: 'left' },
            ],
            detail: {
                cnName: "#detailCnName",
                columns: [],
                sortName: "",
                key: ""
            },
        };
    }
};
export default vueParam;
</script>
